Optimal. Leaf size=127 \[ \frac {F_1\left (1+n;\frac {1+p}{2},\frac {1}{2} (1-2 m+p);2+n;\sin (e+f x),-\sin (e+f x)\right ) \sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1+p}{2}} (d \sin (e+f x))^{1+n} (1+\sin (e+f x))^{\frac {1}{2} (1-2 m+p)} (a+a \sin (e+f x))^m}{d f (1+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.22, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {3005, 2965,
140, 138} \begin {gather*} \frac {\sec (e+f x) (1-\sin (e+f x))^{\frac {p+1}{2}} (a \sin (e+f x)+a)^m (d \sin (e+f x))^{n+1} (g \sec (e+f x))^p (\sin (e+f x)+1)^{\frac {1}{2} (-2 m+p+1)} F_1\left (n+1;\frac {p+1}{2},\frac {1}{2} (-2 m+p+1);n+2;\sin (e+f x),-\sin (e+f x)\right )}{d f (n+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 138
Rule 140
Rule 2965
Rule 3005
Rubi steps
\begin {align*} \int (g \sec (e+f x))^p (d \sin (e+f x))^n (a+a \sin (e+f x))^m \, dx &=\left ((g \cos (e+f x))^p (g \sec (e+f x))^p\right ) \int (g \cos (e+f x))^{-p} (d \sin (e+f x))^n (a+a \sin (e+f x))^m \, dx\\ &=\frac {\left (\sec (e+f x) (g \sec (e+f x))^p (a-a \sin (e+f x))^{\frac {1+p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}}\right ) \text {Subst}\left (\int (d x)^n (a-a x)^{\frac {1}{2} (-1-p)} (a+a x)^{m+\frac {1}{2} (-1-p)} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (\sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1}{2}+\frac {p}{2}} (a-a \sin (e+f x))^{-\frac {1}{2}-\frac {p}{2}+\frac {1+p}{2}} (a+a \sin (e+f x))^{\frac {1+p}{2}}\right ) \text {Subst}\left (\int (1-x)^{\frac {1}{2} (-1-p)} (d x)^n (a+a x)^{m+\frac {1}{2} (-1-p)} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (\sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1}{2}+\frac {p}{2}} (1+\sin (e+f x))^{\frac {1}{2}-m+\frac {p}{2}} (a-a \sin (e+f x))^{-\frac {1}{2}-\frac {p}{2}+\frac {1+p}{2}} (a+a \sin (e+f x))^{-\frac {1}{2}+m-\frac {p}{2}+\frac {1+p}{2}}\right ) \text {Subst}\left (\int (1-x)^{\frac {1}{2} (-1-p)} (d x)^n (1+x)^{m+\frac {1}{2} (-1-p)} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {F_1\left (1+n;\frac {1+p}{2},\frac {1}{2} (1-2 m+p);2+n;\sin (e+f x),-\sin (e+f x)\right ) \sec (e+f x) (g \sec (e+f x))^p (1-\sin (e+f x))^{\frac {1+p}{2}} (d \sin (e+f x))^{1+n} (1+\sin (e+f x))^{\frac {1}{2} (1-2 m+p)} (a+a \sin (e+f x))^m}{d f (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(347\) vs. \(2(127)=254\).
time = 3.57, size = 347, normalized size = 2.73 \begin {gather*} \frac {g (-3+p) F_1\left (\frac {1-p}{2};-n,1+m+n-p;\frac {3-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right ) (g \sec (e+f x))^{-1+p} (d \sin (e+f x))^n (a (1+\sin (e+f x)))^m}{f (-1+p) \left ((-3+p) F_1\left (\frac {1-p}{2};-n,1+m+n-p;\frac {3-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )+2 \left (n F_1\left (\frac {3-p}{2};1-n,1+m+n-p;\frac {5-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )+(1+m+n-p) F_1\left (\frac {3-p}{2};-n,2+m+n-p;\frac {5-p}{2};\cot ^2\left (\frac {1}{4} (2 e+\pi +2 f x)\right ),-\tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )\right ) \tan ^2\left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.19, size = 0, normalized size = 0.00 \[\int \left (g \sec \left (f x +e \right )\right )^{p} \left (d \sin \left (f x +e \right )\right )^{n} \left (a +a \sin \left (f x +e \right )\right )^{m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\sin \left (e+f\,x\right )\right )}^n\,{\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^p\,{\left (a+a\,\sin \left (e+f\,x\right )\right )}^m \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________